package com.os.start.controller;

import com.os.core.common.JsonResult;
import com.os.core.common.ResultCode;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 描述:
 *
 * @author Matt
 * @create 2021-05-30 17:33
 */
@Controller
@RequestMapping("/err")
public class AjaxErrorController {

    @RequestMapping("/ajaxError")
    public String ajaxError(){
        return "thymeleaf/ajaxError";
    }

    @RequestMapping("/getAjaxError")
    @ResponseBody
    public JsonResult getAjaxError(){
        int a = 1 / 0;
        return JsonResult.returnResponse(true, ResultCode.SERVICE_OK);
    }
}
